package consumer;

import org.springframework.context.support.ClassPathXmlApplicationContext;
import service.DemoService;

import java.io.IOException;

public class Consumer {
    public static void main(String[] args) throws IOException {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("consumer.xml");
        context.start();

        DemoService demoService = (DemoService)context.getBean("demoService");
        System.out.println(demoService.sayHello("world"));
        System.in.read();
    }
}
